export default function reducer(state = initState, { type }) {
  console.warn('仓库 收到信息了， type值为', type);

  switch (type) {
    case 'add':
      return {
        ...state,
        count: state.count + 1,
      };
    case 'des':
      return {
        ...state,
        count: state.count - 1,
      };

    case 'addMsg':
      return {
        ...state,
        msg: state.msg + '~',
      };

    default:
      return state;
  }
}
const initState = { count: 0, msg: 'Hello Redux' };
